package com.wn.ziroom.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.wn.ziroom.entity.Room;
import com.wn.ziroom.entity.RoomImg;
import com.wn.ziroom.mapper.RoomImgMapper;
import com.wn.ziroom.service.RoomImgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-24 12:05:59
 */
@Service
public class RoomImgServiceImpl extends ServiceImpl<RoomImgMapper, RoomImg> implements RoomImgService {

    @Override
    public List<RoomImg> getRoomImgs(Integer id) {
        LambdaQueryWrapper<RoomImg> roomImgLambdaQueryWrapper = new LambdaQueryWrapper<>();
        roomImgLambdaQueryWrapper.eq(RoomImg::getRoomId, id);
        List<RoomImg> list = this.list(roomImgLambdaQueryWrapper);
        return list;
    }
}
